473,495 Members | 1,967 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Dynamically generate HTML in C#

I want to write a C# application (lets call it Generator) that will
receive an argument(patient account number) and dynamically generate a
series of linked HTML files (claim information, payments, denials etc)
by querying a database based on the argument. This Generator can be
called from an aspx web page, a Cold Fusion page as well as from a
windows application.
1. Does this C# app have to be a console application to receive
arguments?
2. Is there an easy way to create the HTML file without having to
learn all the HTML syntax?
3. I think it would have been easy enough if it were all within the
ASP.net project itself but because this app needs to be called by a
number of different applications(which are not even .Net apps) I
assume I need a stand-alone generator. Moreover one calling
application is an off-the-shelf third-party product which prevents me
from modifying their code to include the Generator.
This third-party app is however capable of shelling.
4. I assume the calling application should also provide the file name
to be assigned to this generated HTML file because the Generator will
have no way of relaying that information back.
5. Anything else I should be thinking of??
Thanks.
Nov 16 '05 #1
7 25310
Rathtap,

Given the requirements, I don't see how it can NOT be an ASP.NET
application. Basically, you would serve up the HTML as needed. The
parameters would come in the form of querystring parameters.

Then, to get the HTML, you would create a component which would make a
request using the HttpWebRequest and HttpWebResponse classes (accessing your
ASP.NET page), download the HTML and then save it or do whatever you want
with it. The component is what you would be distributing, not the ASP.NET
app. It will always connect to your ASP.NET app.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Rathtap" <am****@yahoo.com> wrote in message
news:b2**************************@posting.google.c om...
I want to write a C# application (lets call it Generator) that will
receive an argument(patient account number) and dynamically generate a
series of linked HTML files (claim information, payments, denials etc)
by querying a database based on the argument. This Generator can be
called from an aspx web page, a Cold Fusion page as well as from a
windows application.
1. Does this C# app have to be a console application to receive
arguments?
2. Is there an easy way to create the HTML file without having to
learn all the HTML syntax?
3. I think it would have been easy enough if it were all within the
ASP.net project itself but because this app needs to be called by a
number of different applications(which are not even .Net apps) I
assume I need a stand-alone generator. Moreover one calling
application is an off-the-shelf third-party product which prevents me
from modifying their code to include the Generator.
This third-party app is however capable of shelling.
4. I assume the calling application should also provide the file name
to be assigned to this generated HTML file because the Generator will
have no way of relaying that information back.
5. Anything else I should be thinking of??
Thanks.

Nov 16 '05 #2
Hi,

You don;t have to create any file for this, you can use an ASP.NET
application running as a "background" then you can use it from the front
web application ( all what is required from the framework used is that it
can use the HTTP protocol; I believe all have this feature) , this has the
convenience that you have all the features ; like session; that provide the
ASP.NET framework.

It would looks like this:

C | | Web app 1 |
| A
L | | ASP |---------------------->| S
I | -------------->|--------------| |
P
E |
| .
N | -------------->| Web app 2 | | N
T | | PHP | --------------------->| E
S | | |
| T
Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Rathtap" <am****@yahoo.com> wrote in message
news:b2**************************@posting.google.c om...
I want to write a C# application (lets call it Generator) that will
receive an argument(patient account number) and dynamically generate a
series of linked HTML files (claim information, payments, denials etc)
by querying a database based on the argument. This Generator can be
called from an aspx web page, a Cold Fusion page as well as from a
windows application.
1. Does this C# app have to be a console application to receive
arguments?
2. Is there an easy way to create the HTML file without having to
learn all the HTML syntax?
3. I think it would have been easy enough if it were all within the
ASP.net project itself but because this app needs to be called by a
number of different applications(which are not even .Net apps) I
assume I need a stand-alone generator. Moreover one calling
application is an off-the-shelf third-party product which prevents me
from modifying their code to include the Generator.
This third-party app is however capable of shelling.
4. I assume the calling application should also provide the file name
to be assigned to this generated HTML file because the Generator will
have no way of relaying that information back.
5. Anything else I should be thinking of??
Thanks.

Nov 16 '05 #3
Hard to say what is best without more details. Possibly have a CCW for a C#
component (just in a library is fine) that passes the inputs to some stored
procedures, then feeds the resultant datasets through some xslt
transformations. I'm assuming CF can call out to COM objects. You'd also
need a small command-line exe that takes the inputs and forwards them to the
C# component, so that the 3rd-party app can play too.

If you want to avoid writing HTML, would it meet your requirements to just
let the browser render an XML tree?

Regards,
Brad Williams
Nov 16 '05 #4
Nicholas,
If my 3rd-party app can call up a URL and pass it a query string then
it seems that I do not need anything other than a simple .Net app with
an aspx page that displays all the info. I also then do not need to
create HTML files on the fly.

What I did not understand was your second paragraph about components
and using the HttpWebRequest and HttpWebResponse classes. What will
this help me achieve? Could you please explain in a little more
detail. I am sorry but this is a 'I do not know enough about the
technology question'.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in message news:<e0**************@tk2msftngp13.phx.gbl>...
Rathtap,

Given the requirements, I don't see how it can NOT be an ASP.NET
application. Basically, you would serve up the HTML as needed. The
parameters would come in the form of querystring parameters.

Then, to get the HTML, you would create a component which would make a
request using the HttpWebRequest and HttpWebResponse classes (accessing your
ASP.NET page), download the HTML and then save it or do whatever you want
with it. The component is what you would be distributing, not the ASP.NET
app. It will always connect to your ASP.NET app.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Rathtap" <am****@yahoo.com> wrote in message
news:b2**************************@posting.google.c om...
I want to write a C# application (lets call it Generator) that will
receive an argument(patient account number) and dynamically generate a
series of linked HTML files (claim information, payments, denials etc)
by querying a database based on the argument. This Generator can be
called from an aspx web page, a Cold Fusion page as well as from a
windows application.
1. Does this C# app have to be a console application to receive
arguments?
2. Is there an easy way to create the HTML file without having to
learn all the HTML syntax?
3. I think it would have been easy enough if it were all within the
ASP.net project itself but because this app needs to be called by a
number of different applications(which are not even .Net apps) I
assume I need a stand-alone generator. Moreover one calling
application is an off-the-shelf third-party product which prevents me
from modifying their code to include the Generator.
This third-party app is however capable of shelling.
4. I assume the calling application should also provide the file name
to be assigned to this generated HTML file because the Generator will
have no way of relaying that information back.
5. Anything else I should be thinking of??
Thanks.

Nov 16 '05 #5
Nicholas,
If my 3rd-party app can call up a URL and pass it a query string then
it seems that I do not need anything other than a simple .Net app with
an aspx page that displays all the info. I also then do not need to
create HTML files on the fly.

What I did not understand was your second paragraph about components
and using the HttpWebRequest and HttpWebResponse classes. What will
this help me achieve? Could you please explain in a little more
detail. I am sorry but this is a 'I do not know enough about the
technology question'.
Nov 16 '05 #6
Rathtap,

Basically, the class you generate would be a helper class which would
take the parameters in a more friendly format, and then send the request to
your site for the HTML. It would also take the response stream and store it
for use in an easier format (in a string, instead of a stream, perhaps). I
mentioned the HttpWebRequest and HttpWebResponse classes because those are
the classes in the framework that you would use in order to get the HTML
from the ASP.NET site in an easy manner.

"Rathtap" <am****@yahoo.com> wrote in message
news:b2**************************@posting.google.c om...
Nicholas,
If my 3rd-party app can call up a URL and pass it a query string then
it seems that I do not need anything other than a simple .Net app with
an aspx page that displays all the info. I also then do not need to
create HTML files on the fly.

What I did not understand was your second paragraph about components
and using the HttpWebRequest and HttpWebResponse classes. What will
this help me achieve? Could you please explain in a little more
detail. I am sorry but this is a 'I do not know enough about the
technology question'.

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote

in message news:<e0**************@tk2msftngp13.phx.gbl>...
Rathtap,

Given the requirements, I don't see how it can NOT be an ASP.NET
application. Basically, you would serve up the HTML as needed. The
parameters would come in the form of querystring parameters.

Then, to get the HTML, you would create a component which would make a request using the HttpWebRequest and HttpWebResponse classes (accessing your ASP.NET page), download the HTML and then save it or do whatever you want with it. The component is what you would be distributing, not the ASP.NET app. It will always connect to your ASP.NET app.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Rathtap" <am****@yahoo.com> wrote in message
news:b2**************************@posting.google.c om...
I want to write a C# application (lets call it Generator) that will
receive an argument(patient account number) and dynamically generate a
series of linked HTML files (claim information, payments, denials etc)
by querying a database based on the argument. This Generator can be
called from an aspx web page, a Cold Fusion page as well as from a
windows application.
1. Does this C# app have to be a console application to receive
arguments?
2. Is there an easy way to create the HTML file without having to
learn all the HTML syntax?
3. I think it would have been easy enough if it were all within the
ASP.net project itself but because this app needs to be called by a
number of different applications(which are not even .Net apps) I
assume I need a stand-alone generator. Moreover one calling
application is an off-the-shelf third-party product which prevents me
from modifying their code to include the Generator.
This third-party app is however capable of shelling.
4. I assume the calling application should also provide the file name
to be assigned to this generated HTML file because the Generator will
have no way of relaying that information back.
5. Anything else I should be thinking of??
Thanks.

Nov 16 '05 #7
Thanks for the responses. I am afraid I am missing the main idea here.
More I think about it the more I am convinced that all I need is a
regular ASP.net app with a page that takes in a query string that
contains the account number. It does its work and dislays the info. An
analogy would be the many websites that link up with Mapquest to
display a map based on the query string that is passed to it.
Here I have numerous apps calling 'PatientQuest' with a claim ID in
the query string that then generates the HTML which is sent back in
the browser.
I'm sorry but I still do not see where the following fits in. Thanks
for the patience.
"Basically, the class you generate would be a helper class which would take the parameters in a more friendly format, and then send the request to
your site for the HTML."
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in message news:<OS**************@TK2MSFTNGP12.phx.gbl>... Rathtap,

Basically, the class you generate would be a helper class which would
take the parameters in a more friendly format, and then send the request to
your site for the HTML. It would also take the response stream and store it
for use in an easier format (in a string, instead of a stream, perhaps). I
mentioned the HttpWebRequest and HttpWebResponse classes because those are
the classes in the framework that you would use in order to get the HTML
from the ASP.NET site in an easy manner.

"Rathtap" <am****@yahoo.com> wrote in message
news:b2**************************@posting.google.c om...
Nicholas,
If my 3rd-party app can call up a URL and pass it a query string then
it seems that I do not need anything other than a simple .Net app with
an aspx page that displays all the info. I also then do not need to
create HTML files on the fly.

What I did not understand was your second paragraph about components
and using the HttpWebRequest and HttpWebResponse classes. What will
this help me achieve? Could you please explain in a little more
detail. I am sorry but this is a 'I do not know enough about the
technology question'.

Nov 16 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2091
by: Dave Nouwens | last post by:
Hi All, Please accept my appologies in advance for what I expect will be a reasonably simple question. I have an html form (which is generated in php) which contains a number of rows (one row...
6
2179
by: poisondart | last post by:
Is there a way to dynamically generate temporary files (such as an html, xml or text file) in Python? I'm not sure if I'm explaining myself clearly as I've no clue how to describe this...
0
2288
by: mscir | last post by:
Date: Thu, 08 Jul 2004 17:02:27 -0700 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <10ero4l3kp2qa65@corp.supernews.com> Reply-To: mscir@usa.com User-Agent: Mozilla/5.0...
4
2634
by: Jake Lewis | last post by:
I have an HTML page that loads fine including the .js file <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> <script...
0
3405
by: Avon | last post by:
Hi friends, I am very sorry for my not perfect English. I have one question, I am using David Bauer's DynamicControlsPlaceholder to dinamically generate controls and I am tryig to generate...
4
2179
by: Mike Lowery | last post by:
I have an ASP.Net page that simply generates a dynamic page using Response.Write() statements to generate the HTML. This works great except that one of the things I want to generate is a...
7
3553
by: rsaffy | last post by:
I am having trouble with my dynamically created button's event handling. I read that the buttons need to be recreated on every trip to the server, but how exactly do you do that when the datagrid...
9
1859
by: Dahak | last post by:
I'm trying to generate dynamic functions to use as separate callbacks for an AJAX API call. The API doesn't seem to allow for the inclusion of any parameters in the callback, so I can't...
1
2466
by: divyac | last post by:
I am doing an inventory project using PHP in which there is a text box.The customer id should be entered in that text box.If that customer id is valid,another text box should be generated in which...
0
7120
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7160
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6878
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4897
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4583
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
649
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
286
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.